package com.ruoyi.system.service.impl;


import com.ruoyi.system.domain.TeacherSubject;
import com.ruoyi.system.mapper.TeacherSubjectMapper;
import com.ruoyi.system.service.ITeacherSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 教师学科Service业务层处理
 * 
 * @author bearzz
 * @date 2024-01-22
 */
@Service
public class TeacherSubjectServiceImpl implements ITeacherSubjectService
{
    @Autowired
    private TeacherSubjectMapper teacherSubjectMapper;

    /**
     * 查询教师学科
     * 
     * @param id 教师学科主键
     * @return 教师学科
     */
    @Override
    public TeacherSubject selectTeacherSubjectById(Long id)
    {
        return teacherSubjectMapper.selectTeacherSubjectById(id);
    }

    /**
     * 查询教师学科列表
     * 
     * @param teacherSubject 教师学科
     * @return 教师学科
     */
    @Override
    public List<TeacherSubject> selectTeacherSubjectList(TeacherSubject teacherSubject)
    {
        return teacherSubjectMapper.selectTeacherSubjectList(teacherSubject);
    }

    /**
     * 新增教师学科
     * 
     * @param teacherSubject 教师学科
     * @return 结果
     */
    @Override
    public int insertTeacherSubject(TeacherSubject teacherSubject)
    {
        return teacherSubjectMapper.insertTeacherSubject(teacherSubject);
    }

    /**
     * 修改教师学科
     * 
     * @param teacherSubject 教师学科
     * @return 结果
     */
    @Override
    public int updateTeacherSubject(TeacherSubject teacherSubject)
    {
        return teacherSubjectMapper.updateTeacherSubject(teacherSubject);
    }

    /**
     * 批量删除教师学科
     * 
     * @param ids 需要删除的教师学科主键
     * @return 结果
     */
    @Override
    public int deleteTeacherSubjectByIds(Long[] ids)
    {
        return teacherSubjectMapper.deleteTeacherSubjectByIds(ids);
    }

    /**
     * 删除教师学科信息
     * 
     * @param id 教师学科主键
     * @return 结果
     */
    @Override
    public int deleteTeacherSubjectById(Long id)
    {
        return teacherSubjectMapper.deleteTeacherSubjectById(id);
    }
}
